package com.platform.dao;

import com.platform.entity.SurveyVo;
import com.platform.entity.SurveyQuestionVo;
import com.platform.entity.SurveyUserVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ApiSurveyUserMapper extends BaseDao<SurveyUserVo>{

    int saveUser(@Param("contactId") int contactId, @Param("username") String username,
                 @Param("password") String password, @Param("privilege") String privilege);

    int saveData(@Param("questionId") int questionId, @Param("question") String question,
                 @Param("anserType") String anserType, @Param("surveyId") int surveyId);

    void saveAnswer(@Param("answerId") int answerId, @Param("choiceText") String choiceText,
                    @Param("poll")  int poll, @Param("questionId") int questionId);

    int saveName(SurveyVo surveyVo);

    long saveQuestion(List<SurveyQuestionVo> questionList);
}
